ndarry的类型

ndarry的类型

创建数组的时候指定数据类型,不指定,整数默认int64,小数默认float64:

a = np.array([[1, 2, 3],[4, 5, 6]], dtype=np.float32)